fix: async.run_command: report error exit code and stderr #2896
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I ran into an error like #2733 when opening a project where
go
was unable to start, and noticedasync.run_command
didn't report an error at all.This adds a check for the exit code of the command, reporting that back to the user with stderr output, and changes the existing error check: jobid -1 is returned when the command can't start at all, and there shouldn't be any stderr output at that point either. Normally, you could get further detail "errno" style, but i don't see that this is exposed by the job api.
Example after fix:
It's possible merging this will add some insight into the ways people are still running into #2733 - though it doesn't mess with the actual place where mod_cache is nil and emitting that message.